<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../style/default/jsvm.css"/>
<link rel="stylesheet" type="text/css" href="../../style/default/dashboard.css"/>
<script id="j$vm" src="../../jsvm/jsre.js" ></script>
<script src="../../jsvm/lib/jsre-ui.js" ></script>
<style>

.panel_0 {
    left: 100px;
    top: 100px;
    width: 400px;
    height:300px;
    border: 2px solid red;
    padding: 5px;
    background-color: #CCCCCC;
}

.bt_0{
   width: 60px;
   height: 30px;
   background-color: #FFFFFF;
   border: 1px solid blue;
}

.labButton_0{
    background-color:#CCCCCC;
    color:white;
    cursor:pointer;
    font-weight: bold;
    text-align : center;
    width: 90px;
    height:16px;
}

.card1_0, .card2_0, .card3_0, .card4_0 {
    width: 60px;
    height:60px;
}

.card1_0 {
    left: 0px;
    border: 2px solid red;
}

.card2_0 {
    left: 60px;
    border: 2px solid green;
}

.card3_0 {
    left: 120px;
    border: 2px solid blue;
}

.card4_0 {
    left: 180px;
    border: 2px solid red;
}


.simple {
    position: absolute;
    left: 0px;
    top : 0px;
    width: 100px;
    height: 200px;
    border: 2px solid red;
    padding: 3px;
    margin: 4px;
}


</style>
</head>
<body>


</body>


<script type="text/javascript">

J$VM.exec("Demo",function(System){

    this.prefer({theme: "default"});
    
    var comp, n= 10000, start = new Date();

    var comp0 = new js.awt.BaseComponent(
                      {className: "simple", 
                      stateless:true,
                      x:0, y:0, width:100, height:200
                      }, this);

        this.view.appendChild(comp0.view);

    for(var i=0; i<n; i++){
        comp = new js.awt.BaseComponent(
                      {className: "simple", 
                      stateless:true,
                      x:0, y:0, width:100, height:200
                      }, this, comp0.cloneView());

         this.view.appendChild(comp.view);

    }
    System.err.println("Cost time: "+(new Date() - start));

});
</script>
</html>
